<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>EOS.IO: contracts/social/social.cpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="eos-logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">EOS.IO
   &#160;<span id="projectnumber">DAWN1.1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_ae9b15dd87e066e1908bbd90e8f38627.html">contracts</a></li><li class="navelem"><a class="el" href="dir_44e8454330c52effb0ef98d8f3108add.html">social</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">social.cpp File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;<a class="el" href="eos_8hpp_source.html">eos.hpp</a>&gt;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for social.cpp:</div>
<div class="dyncontent">
<div class="center"><img src="social_8cpp__incl.png" border="0" usemap="#contracts_2social_2social_8cpp" alt=""/></div>
<map name="contracts_2social_2social_8cpp" id="contracts_2social_2social_8cpp">
<area shape="rect" id="node2" href="eos_8hpp.html" title="eos.hpp" alt="" coords="161,80,229,107"/>
<area shape="rect" id="node3" href="types_8hpp.html" title="eoslib/types.hpp" alt="" coords="5,304,123,331"/>
<area shape="rect" id="node5" href="message_8hpp.html" title="eoslib/message.hpp" alt="" coords="232,155,371,181"/>
<area shape="rect" id="node8" href="print_8hpp.html" title="eoslib/print.hpp" alt="" coords="214,229,325,256"/>
<area shape="rect" id="node10" href="math_8hpp.html" title="eoslib/math.hpp" alt="" coords="147,304,261,331"/>
<area shape="rect" id="node12" href="transaction_8hpp.html" title="eoslib/transaction.hpp" alt="" coords="395,155,544,181"/>
<area shape="rect" id="node4" href="types_8h.html" title="eoslib/types.h" alt="" coords="174,528,277,555"/>
<area shape="rect" id="node6" href="message_8h.html" title="eoslib/message.h" alt="" coords="293,379,417,405"/>
<area shape="rect" id="node7" href="system_8h.html" title="eoslib/system.h" alt="" coords="168,453,283,480"/>
<area shape="rect" id="node9" href="print_8h.html" title="eoslib/print.h" alt="" coords="285,304,381,331"/>
<area shape="rect" id="node11" href="math_8h.html" title="eoslib/math.h" alt="" coords="161,379,261,405"/>
<area shape="rect" id="node13" href="transaction_8h.html" title="eoslib/transaction.h" alt="" coords="365,453,499,480"/>
</map>
</div>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_post_action.html">PostAction</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vote_action.html">VoteAction</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_post_record.html">PostRecord</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_account.html">Account</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a2f4b1a700aef8a99b9d4c12d252d231a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="social_8cpp.html#a2f4b1a700aef8a99b9d4c12d252d231a">apply_social_post</a> ()</td></tr>
<tr class="separator:a2f4b1a700aef8a99b9d4c12d252d231a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac3d5473926cea7fd3ad0bbcb7186fc6f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="social_8cpp.html#ac3d5473926cea7fd3ad0bbcb7186fc6f">apply_social_vote</a> ()</td></tr>
<tr class="separator:ac3d5473926cea7fd3ad0bbcb7186fc6f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><dl class="section copyright"><dt>Copyright</dt><dd>defined in eos/LICENSE.txt </dd></dl>
</div><h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a2f4b1a700aef8a99b9d4c12d252d231a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void apply_social_post </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>When a user posts we create a record that tracks the total votes and the time it was created. A user can submit this action multiple times, but subsequent calls do nothing.</p>
<p>This method only does something when called in the context of the author, if any other contexts are notified </p>

</div>
</div>
<a class="anchor" id="ac3d5473926cea7fd3ad0bbcb7186fc6f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void apply_social_vote </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This action is called when a user casts a vote, it requires that this code is executed in the context of both the voter and the author. When executed in the author's context it updates the vote total. When executed </p>
<p>prevent the author's code from rejecting the potentially negative vote </p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
